package com.wpw.dream.instance;

public class Person {

	protected String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Person(String name) {
		this.name = name;
	}

	public final void finalFunction() {
		
	}
	
	@Override
	public boolean equals(Object obj) {
//		if (obj.getClass() == Person.class) {
		if (obj instanceof Person) {
			Person p = (Person) obj;
			if (p.getName() == null || name == null) {
				return false;
			} else {
				return name.equalsIgnoreCase(p.getName());
			}
		}
		return false;
	}

}
